package burubaka.meta;

//@javax.annotation.Generated(value = { "slim3-gen", "@VERSION@" }, date = "2012-05-04 21:41:09")
/** */
public final class PayOffMeta extends org.slim3.datastore.ModelMeta<burubaka.model.PayOff> {

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> bracketExacta = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "bracketExacta", "bracketExacta", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> bracketExactaNo = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "bracketExactaNo", "bracketExactaNo");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> bracketQuinella = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "bracketQuinella", "bracketQuinella", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> bracketQuinellaNo = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "bracketQuinellaNo", "bracketQuinellaNo");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> exacta = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "exacta", "exacta", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> exactaNo = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "exactaNo", "exactaNo");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, com.google.appengine.api.datastore.Key> key = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, com.google.appengine.api.datastore.Key>(this, "__key__", "key", com.google.appengine.api.datastore.Key.class);

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> place1 = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "place1", "place1", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> place1No = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "place1No", "place1No");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> place2 = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "place2", "place2", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> place2No = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "place2No", "place2No");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> place3 = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "place3", "place3", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> place3No = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "place3No", "place3No");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> quinella = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "quinella", "quinella", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> quinellaNo = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "quinellaNo", "quinellaNo");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> quinellaPlace1 = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "quinellaPlace1", "quinellaPlace1", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> quinellaPlace1No = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "quinellaPlace1No", "quinellaPlace1No");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> quinellaPlace2 = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "quinellaPlace2", "quinellaPlace2", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> quinellaPlace2No = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "quinellaPlace2No", "quinellaPlace2No");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> quinellaPlace3 = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "quinellaPlace3", "quinellaPlace3", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> quinellaPlace3No = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "quinellaPlace3No", "quinellaPlace3No");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> trifecta = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "trifecta", "trifecta", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> trifectaNo = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "trifectaNo", "trifectaNo");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> trio = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "trio", "trio", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> trioNo = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "trioNo", "trioNo");

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> version = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "version", "version", java.lang.Long.class);

    /** */
    public final org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long> win = new org.slim3.datastore.CoreAttributeMeta<burubaka.model.PayOff, java.lang.Long>(this, "win", "win", long.class);

    /** */
    public final org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff> winNo = new org.slim3.datastore.StringAttributeMeta<burubaka.model.PayOff>(this, "winNo", "winNo");

    private static final PayOffMeta slim3_singleton = new PayOffMeta();

    /**
     * @return the singleton
     */
    public static PayOffMeta get() {
       return slim3_singleton;
    }

    /** */
    public PayOffMeta() {
        super("PayOff", burubaka.model.PayOff.class);
    }

    @Override
    public burubaka.model.PayOff entityToModel(com.google.appengine.api.datastore.Entity entity) {
        burubaka.model.PayOff model = new burubaka.model.PayOff();
        model.setBracketExacta(longToPrimitiveLong((java.lang.Long) entity.getProperty("bracketExacta")));
        model.setBracketExactaNo((java.lang.String) entity.getProperty("bracketExactaNo"));
        model.setBracketQuinella(longToPrimitiveLong((java.lang.Long) entity.getProperty("bracketQuinella")));
        model.setBracketQuinellaNo((java.lang.String) entity.getProperty("bracketQuinellaNo"));
        model.setExacta(longToPrimitiveLong((java.lang.Long) entity.getProperty("exacta")));
        model.setExactaNo((java.lang.String) entity.getProperty("exactaNo"));
        model.setKey(entity.getKey());
        model.setPlace1(longToPrimitiveLong((java.lang.Long) entity.getProperty("place1")));
        model.setPlace1No((java.lang.String) entity.getProperty("place1No"));
        model.setPlace2(longToPrimitiveLong((java.lang.Long) entity.getProperty("place2")));
        model.setPlace2No((java.lang.String) entity.getProperty("place2No"));
        model.setPlace3(longToPrimitiveLong((java.lang.Long) entity.getProperty("place3")));
        model.setPlace3No((java.lang.String) entity.getProperty("place3No"));
        model.setQuinella(longToPrimitiveLong((java.lang.Long) entity.getProperty("quinella")));
        model.setQuinellaNo((java.lang.String) entity.getProperty("quinellaNo"));
        model.setQuinellaPlace1(longToPrimitiveLong((java.lang.Long) entity.getProperty("quinellaPlace1")));
        model.setQuinellaPlace1No((java.lang.String) entity.getProperty("quinellaPlace1No"));
        model.setQuinellaPlace2(longToPrimitiveLong((java.lang.Long) entity.getProperty("quinellaPlace2")));
        model.setQuinellaPlace2No((java.lang.String) entity.getProperty("quinellaPlace2No"));
        model.setQuinellaPlace3(longToPrimitiveLong((java.lang.Long) entity.getProperty("quinellaPlace3")));
        model.setQuinellaPlace3No((java.lang.String) entity.getProperty("quinellaPlace3No"));
        model.setTrifecta(longToPrimitiveLong((java.lang.Long) entity.getProperty("trifecta")));
        model.setTrifectaNo((java.lang.String) entity.getProperty("trifectaNo"));
        model.setTrio(longToPrimitiveLong((java.lang.Long) entity.getProperty("trio")));
        model.setTrioNo((java.lang.String) entity.getProperty("trioNo"));
        model.setVersion((java.lang.Long) entity.getProperty("version"));
        model.setWin(longToPrimitiveLong((java.lang.Long) entity.getProperty("win")));
        model.setWinNo((java.lang.String) entity.getProperty("winNo"));
        return model;
    }

    @Override
    public com.google.appengine.api.datastore.Entity modelToEntity(java.lang.Object model) {
        burubaka.model.PayOff m = (burubaka.model.PayOff) model;
        com.google.appengine.api.datastore.Entity entity = null;
        if (m.getKey() != null) {
            entity = new com.google.appengine.api.datastore.Entity(m.getKey());
        } else {
            entity = new com.google.appengine.api.datastore.Entity(kind);
        }
        entity.setProperty("bracketExacta", m.getBracketExacta());
        entity.setProperty("bracketExactaNo", m.getBracketExactaNo());
        entity.setProperty("bracketQuinella", m.getBracketQuinella());
        entity.setProperty("bracketQuinellaNo", m.getBracketQuinellaNo());
        entity.setProperty("exacta", m.getExacta());
        entity.setProperty("exactaNo", m.getExactaNo());
        entity.setProperty("place1", m.getPlace1());
        entity.setProperty("place1No", m.getPlace1No());
        entity.setProperty("place2", m.getPlace2());
        entity.setProperty("place2No", m.getPlace2No());
        entity.setProperty("place3", m.getPlace3());
        entity.setProperty("place3No", m.getPlace3No());
        entity.setProperty("quinella", m.getQuinella());
        entity.setProperty("quinellaNo", m.getQuinellaNo());
        entity.setProperty("quinellaPlace1", m.getQuinellaPlace1());
        entity.setProperty("quinellaPlace1No", m.getQuinellaPlace1No());
        entity.setProperty("quinellaPlace2", m.getQuinellaPlace2());
        entity.setProperty("quinellaPlace2No", m.getQuinellaPlace2No());
        entity.setProperty("quinellaPlace3", m.getQuinellaPlace3());
        entity.setProperty("quinellaPlace3No", m.getQuinellaPlace3No());
        entity.setProperty("trifecta", m.getTrifecta());
        entity.setProperty("trifectaNo", m.getTrifectaNo());
        entity.setProperty("trio", m.getTrio());
        entity.setProperty("trioNo", m.getTrioNo());
        entity.setProperty("version", m.getVersion());
        entity.setProperty("win", m.getWin());
        entity.setProperty("winNo", m.getWinNo());
        entity.setProperty("slim3.schemaVersion", 1);
        return entity;
    }

    @Override
    protected com.google.appengine.api.datastore.Key getKey(Object model) {
        burubaka.model.PayOff m = (burubaka.model.PayOff) model;
        return m.getKey();
    }

    @Override
    protected void setKey(Object model, com.google.appengine.api.datastore.Key key) {
        validateKey(key);
        burubaka.model.PayOff m = (burubaka.model.PayOff) model;
        m.setKey(key);
    }

    @Override
    protected long getVersion(Object model) {
        burubaka.model.PayOff m = (burubaka.model.PayOff) model;
        return m.getVersion() != null ? m.getVersion().longValue() : 0L;
    }

    @Override
    protected void assignKeyToModelRefIfNecessary(com.google.appengine.api.datastore.AsyncDatastoreService ds, java.lang.Object model) {
    }

    @Override
    protected void incrementVersion(Object model) {
        burubaka.model.PayOff m = (burubaka.model.PayOff) model;
        long version = m.getVersion() != null ? m.getVersion().longValue() : 0L;
        m.setVersion(Long.valueOf(version + 1L));
    }

    @Override
    protected void prePut(Object model) {
    }

    @Override
    protected void postGet(Object model) {
    }

    @Override
    public String getSchemaVersionName() {
        return "slim3.schemaVersion";
    }

    @Override
    public String getClassHierarchyListName() {
        return "slim3.classHierarchyList";
    }

    @Override
    protected boolean isCipherProperty(String propertyName) {
        return false;
    }

    @Override
    protected void modelToJson(org.slim3.datastore.json.JsonWriter writer, java.lang.Object model, int maxDepth, int currentDepth) {
        burubaka.model.PayOff m = (burubaka.model.PayOff) model;
        writer.beginObject();
        org.slim3.datastore.json.Default encoder0 = new org.slim3.datastore.json.Default();
        writer.setNextPropertyName("bracketExacta");
        encoder0.encode(writer, m.getBracketExacta());
        if(m.getBracketExactaNo() != null){
            writer.setNextPropertyName("bracketExactaNo");
            encoder0.encode(writer, m.getBracketExactaNo());
        }
        writer.setNextPropertyName("bracketQuinella");
        encoder0.encode(writer, m.getBracketQuinella());
        if(m.getBracketQuinellaNo() != null){
            writer.setNextPropertyName("bracketQuinellaNo");
            encoder0.encode(writer, m.getBracketQuinellaNo());
        }
        writer.setNextPropertyName("exacta");
        encoder0.encode(writer, m.getExacta());
        if(m.getExactaNo() != null){
            writer.setNextPropertyName("exactaNo");
            encoder0.encode(writer, m.getExactaNo());
        }
        writer.setNextPropertyName("place1");
        encoder0.encode(writer, m.getPlace1());
        if(m.getPlace1No() != null){
            writer.setNextPropertyName("place1No");
            encoder0.encode(writer, m.getPlace1No());
        }
        writer.setNextPropertyName("place2");
        encoder0.encode(writer, m.getPlace2());
        if(m.getPlace2No() != null){
            writer.setNextPropertyName("place2No");
            encoder0.encode(writer, m.getPlace2No());
        }
        writer.setNextPropertyName("place3");
        encoder0.encode(writer, m.getPlace3());
        if(m.getPlace3No() != null){
            writer.setNextPropertyName("place3No");
            encoder0.encode(writer, m.getPlace3No());
        }
        writer.setNextPropertyName("quinella");
        encoder0.encode(writer, m.getQuinella());
        if(m.getQuinellaNo() != null){
            writer.setNextPropertyName("quinellaNo");
            encoder0.encode(writer, m.getQuinellaNo());
        }
        writer.setNextPropertyName("quinellaPlace1");
        encoder0.encode(writer, m.getQuinellaPlace1());
        if(m.getQuinellaPlace1No() != null){
            writer.setNextPropertyName("quinellaPlace1No");
            encoder0.encode(writer, m.getQuinellaPlace1No());
        }
        writer.setNextPropertyName("quinellaPlace2");
        encoder0.encode(writer, m.getQuinellaPlace2());
        if(m.getQuinellaPlace2No() != null){
            writer.setNextPropertyName("quinellaPlace2No");
            encoder0.encode(writer, m.getQuinellaPlace2No());
        }
        writer.setNextPropertyName("quinellaPlace3");
        encoder0.encode(writer, m.getQuinellaPlace3());
        if(m.getQuinellaPlace3No() != null){
            writer.setNextPropertyName("quinellaPlace3No");
            encoder0.encode(writer, m.getQuinellaPlace3No());
        }
        writer.setNextPropertyName("trifecta");
        encoder0.encode(writer, m.getTrifecta());
        if(m.getTrifectaNo() != null){
            writer.setNextPropertyName("trifectaNo");
            encoder0.encode(writer, m.getTrifectaNo());
        }
        writer.setNextPropertyName("trio");
        encoder0.encode(writer, m.getTrio());
        if(m.getTrioNo() != null){
            writer.setNextPropertyName("trioNo");
            encoder0.encode(writer, m.getTrioNo());
        }
        writer.setNextPropertyName("win");
        encoder0.encode(writer, m.getWin());
        if(m.getWinNo() != null){
            writer.setNextPropertyName("winNo");
            encoder0.encode(writer, m.getWinNo());
        }
        writer.endObject();
    }

    @Override
    protected burubaka.model.PayOff jsonToModel(org.slim3.datastore.json.JsonRootReader rootReader, int maxDepth, int currentDepth) {
        burubaka.model.PayOff m = new burubaka.model.PayOff();
        org.slim3.datastore.json.JsonReader reader = null;
        org.slim3.datastore.json.Default decoder0 = new org.slim3.datastore.json.Default();
        reader = rootReader.newObjectReader("bracketExacta");
        m.setBracketExacta(decoder0.decode(reader, m.getBracketExacta()));
        reader = rootReader.newObjectReader("bracketExactaNo");
        m.setBracketExactaNo(decoder0.decode(reader, m.getBracketExactaNo()));
        reader = rootReader.newObjectReader("bracketQuinella");
        m.setBracketQuinella(decoder0.decode(reader, m.getBracketQuinella()));
        reader = rootReader.newObjectReader("bracketQuinellaNo");
        m.setBracketQuinellaNo(decoder0.decode(reader, m.getBracketQuinellaNo()));
        reader = rootReader.newObjectReader("exacta");
        m.setExacta(decoder0.decode(reader, m.getExacta()));
        reader = rootReader.newObjectReader("exactaNo");
        m.setExactaNo(decoder0.decode(reader, m.getExactaNo()));
        reader = rootReader.newObjectReader("place1");
        m.setPlace1(decoder0.decode(reader, m.getPlace1()));
        reader = rootReader.newObjectReader("place1No");
        m.setPlace1No(decoder0.decode(reader, m.getPlace1No()));
        reader = rootReader.newObjectReader("place2");
        m.setPlace2(decoder0.decode(reader, m.getPlace2()));
        reader = rootReader.newObjectReader("place2No");
        m.setPlace2No(decoder0.decode(reader, m.getPlace2No()));
        reader = rootReader.newObjectReader("place3");
        m.setPlace3(decoder0.decode(reader, m.getPlace3()));
        reader = rootReader.newObjectReader("place3No");
        m.setPlace3No(decoder0.decode(reader, m.getPlace3No()));
        reader = rootReader.newObjectReader("quinella");
        m.setQuinella(decoder0.decode(reader, m.getQuinella()));
        reader = rootReader.newObjectReader("quinellaNo");
        m.setQuinellaNo(decoder0.decode(reader, m.getQuinellaNo()));
        reader = rootReader.newObjectReader("quinellaPlace1");
        m.setQuinellaPlace1(decoder0.decode(reader, m.getQuinellaPlace1()));
        reader = rootReader.newObjectReader("quinellaPlace1No");
        m.setQuinellaPlace1No(decoder0.decode(reader, m.getQuinellaPlace1No()));
        reader = rootReader.newObjectReader("quinellaPlace2");
        m.setQuinellaPlace2(decoder0.decode(reader, m.getQuinellaPlace2()));
        reader = rootReader.newObjectReader("quinellaPlace2No");
        m.setQuinellaPlace2No(decoder0.decode(reader, m.getQuinellaPlace2No()));
        reader = rootReader.newObjectReader("quinellaPlace3");
        m.setQuinellaPlace3(decoder0.decode(reader, m.getQuinellaPlace3()));
        reader = rootReader.newObjectReader("quinellaPlace3No");
        m.setQuinellaPlace3No(decoder0.decode(reader, m.getQuinellaPlace3No()));
        reader = rootReader.newObjectReader("trifecta");
        m.setTrifecta(decoder0.decode(reader, m.getTrifecta()));
        reader = rootReader.newObjectReader("trifectaNo");
        m.setTrifectaNo(decoder0.decode(reader, m.getTrifectaNo()));
        reader = rootReader.newObjectReader("trio");
        m.setTrio(decoder0.decode(reader, m.getTrio()));
        reader = rootReader.newObjectReader("trioNo");
        m.setTrioNo(decoder0.decode(reader, m.getTrioNo()));
        reader = rootReader.newObjectReader("win");
        m.setWin(decoder0.decode(reader, m.getWin()));
        reader = rootReader.newObjectReader("winNo");
        m.setWinNo(decoder0.decode(reader, m.getWinNo()));
        return m;
    }
}